package com.example.dakotanews.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * @description 新闻实体类，与数据库中news table的类型一致，字段的含义详见数据表设计
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("news")
public class News {

    @TableId(type = IdType.AUTO)
    private Integer id;
    private Integer userId;
    private Integer sortId;
    private String title;
    private String cover;
    private String summary;
    private String content;
    private int supportNum;
    private int oppositionNum;
    private int collectionNum;
    private int pageView;
    private int issueNum;
    private LocalDateTime publishTime;
    private LocalDateTime editTime;
    private int status;


}
